-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: adds "UnitsDataArray.open" and "UnitsDataArray.create" class methods #334
Conversation
Changes "create_data_array" to "create_dataarray" to be consistent with xarray naming convention in methods. This feature adds the ability to symmetrically go between UnitsDataArray -> netcdf -> UnitsDataArray. The goal is move away from pickle in the lambda function interface and more generally, provide users a way to share binary outputs and get them back in PODPAC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THis looks good, and I think it will work just fine. I would prefer the functions to be a class method on UnitsDataArray
Also, looks like the build is failing, which may explain the reduced coverage https://travis-ci.org/creare-com/podpac/builds/610568191 |
I would prefer this too. I'll make this change and review before merging |
…vor of classmethods `UnitsDataArray.create()` and `UnitsDataArray.open()` This is much more clear to me and completes discussion in #334
…hould be overwritten by the aws-improvements branch
units
module.
Updated PR context above |
There was something nagging at the back of my mind. We did serialize/deserialize already in the cache: see here: https://github.com/creare-com/podpac/blob/develop/podpac/core/cache/file_cache_store.py#L147 I'm guessing those lines will need some (minor) updates as well |
UnitsDataArray.open
class methodcreate_data_array
tocreate_dataarray
to be consistent with xarray naming convention in methods.create_dataarray
in favor ofUnitsDataArray.create
This feature adds the ability to symmetrically go between UnitsDataArray -> netcdf -> UnitsDataArray. The goal is move away from pickle in the lambda function interface and more generally, provide users a way to export/import binary outputs from/to PODPAC.
Bothcreare_dataarray
andopen_dataarray
could probably be classmethods, like we have done in the Coordinates module. It may also be useful toexport
andimport
methods onUnitsDataArray
that uses theto_netcdf
andopen_datarray
in the background.Done in e9abbc4
Example